In addition to a hard disk unit and a floppy (registered trademark) disk, an EEPROM (Electrically Erasable/Programmable Read Only Memory) flash memory is used as a recording medium which is accessible (data readable and erasable) by a computer or the like. In case where a flash memory is used to store files under the control of a disk operating system, such as MS-DOS (registered trademark) or Windows (registered trademark), each of which is a product of Microsoft Corporation, the control becomes easy if a scheme using data read/write units (e.g., 512 bytes), which has conventionally been used at the time of using a hard disk unit, is employed.
The unit of the memory capacity of a flash memory in case where data is read or written (this unit being generally called “page” or “sector”) is larger than the unit of the memory capacity in case of erasing data (the latter unit being generally called “block”). In case of storing data, the logic state of memory units (cells) can be changed only in one direction (e.g., in the direction from “1” to “0”) and setting the memory units to the initial state (e.g., “1”) requires an operation to erase the memory contents block by block (flash erase).
In case of renewing or erasing data stored in the flash memory, therefore, that data in a block containing data to be renewed which is not to be renewed is transferred to another block first. Then, the block containing data to be renewed is flash-erased or renewed data is written in that block.
Of flash memories, particularly, a NAND type has a difficulty in sufficiently preventing the occurrence of defective blocks which cannot carry out the proper data storage at the manufacturing stage. To cope with the difficulty of the conventional flash memory, therefore, consecutive logical addresses separate from physical addresses allocated to the respective blocks are dynamically allocated to proper blocks and an address translation table which shows the correlation between the physical addresses and the logical addresses is prepared to avoid complication of external access procedures which may be originated from addresses becoming discontiguous.
In case of renewing or erasing data stored in the flash memory, conventionally, all the pieces of data in a block containing data to be renewed or erased were read out. Therefore, data reading took time, which would eventually make the time needed to rewrite or erase data very long as a whole.
In case of rewriting a file whose amount of data is very small as compared with the memory capacity for one block, the flash memory flash-erases a block that contains lots of pages which store data irrelevant to the file and pages which are not holding data. While a NAND type flash memory can achieve a large-capacity structure at a low cost, it would be too degraded to perform proper data reading and writing by repetitive flash erase.
Therefore, the execution of the aforementioned operation rewrites a small amount of data, which results in inefficient frequent flash erase. This quickens the degrading of the flash memory.
Particularly, the memory capacity of the flash memory larger has become very huge to increase the memory capacity per page and the memory capacity per block considerably larger; for example, the memory capacity has increased to about two Kbytes per page or about 128 Kbytes per block.
Further, the increased memory capacity of the flash memory increases the case where the memory capacity which is physically equivalent to one page (hereinafter called “physical page”) is virtually divided into plural memory areas (hereinafter called “logical pages”) and is used in that form. In case where a physical page is divided into plural logical pages and is used in that form, even when data to be renewed or erased does not amount to one physical page, a block which holds this data is erased.
This further calls for the need for prevention of inefficient flash erase.